import { createApp, onUpdated } from 'vue'
import App from './App.vue'
var app = createApp(App)
// 新建一个 v-pin 方法
app.directive('pin', {
    mounted(el, binding) {
        el.style.position = 'fixed'
        const s = binding.arg || 'top'
        el.style[s] = binding.value + 'px'
    },
    updated(el, binding) {
        const s = binding.arg || 'top'
        el.style[s] = binding.value + 'px'
    }

})

app.mount('#app')
